
if not exists (select * from dbo.sysobjects where id = object_id(N'dbo.[ChangedData__{tableIdentifier}]') and OBJECTPROPERTY(id, N'IsTable') = 1)
BEGIN

	CREATE TABLE dbo.[ChangedData__{tableIdentifier}]
	(
		ID bigint identity(1,1),
		ChangeTransactionId bigint not null,
		SourceRowId bigint not null,
		SourceColumnId int not null,
		SourceFieldValue sql_variant null
		CONSTRAINT [UnChangedData__{tableIdentifier}_SrcRowIdSrcColumnIdChangeTranId] UNIQUE CLUSTERED (SourceRowId,SourceColumnId,ChangeTransactionId)
	)


	ALTER TABLE dbo.[ChangedData__{tableIdentifier}] ADD CONSTRAINT [FkChangedData__{tableIdentifier}_ChangeTransaction]
		FOREIGN KEY(ChangeTransactionId) REFERENCES ChangeTransaction(ID)

	ALTER TABLE dbo.[ChangedData__{tableIdentifier}] ADD CONSTRAINT [FkChangedData__{tableIdentifier}_SourceColumn]
		FOREIGN KEY(SourceColumnId) REFERENCES SourceColumn(ID)
		
END